<?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');
class User_model extends MY_Model
{
    private $table ='user';
	public function __construct()
	{
		parent::__construct($this->table);
	
	}
	//判断某一微信ID是否已注册
	public function is_reg($openid){
	    $this->db->where('wxId', $openid);
	    $result = $this->db->get($this->table)->row_array();
	    return $result;
	}
	//判断登录用户账号
	public function login($where){
	    $this->db->where_in('userFlag',[1,2,4]);
	    return $this->getWhereRow($where);
	}
	
}
?>